package com.deyuanyun.pic.pipe.domain.custom;

import com.deyuanyun.pic.common.util.ConvertUtil;
import com.deyuanyun.pic.pipe.domain.PicPipePiggingstructure;
import com.deyuanyun.pic.pipe.domain.exceldomain.PiggingStructureVO;

/**
 * Created by xu on 2016/1/29.
 */
public class CustomPicPipePiggingstructure extends PicPipePiggingstructure {
    private String lineName;
    private String segmentName;
    private String valveroomName;//场站阀室
    private String manufacturedDateStr;//生产日期

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }

    public String getSegmentName() {
        return segmentName;
    }

    public void setSegmentName(String segmentName) {
        this.segmentName = segmentName;
    }

    public String getValveroomName() {
        return valveroomName;
    }

    public void setValveroomName(String valveroomName) {
        this.valveroomName = valveroomName;
    }

    public String getManufacturedDateStr() {
        return manufacturedDateStr;
    }

    public void setManufacturedDateStr(String manufacturedDateStr) {
        this.manufacturedDateStr = manufacturedDateStr;
    }

    public PiggingStructureVO toVO()throws Exception{
        PiggingStructureVO vo=new PiggingStructureVO();
        //ConvertUtil.coverWithSpring(this,vo);
        ConvertUtil.copy(this,vo);
        if (this.getRecordtime()!=null){
            vo.setRecordtime(com.deyuanyun.pic.common.util.DateUtil.DateToStringYMd(this.getRecordtime()));
        }
        vo.setPipeValveroomId(this.getValveroomName());
        vo.setManufacturedDate(this.getManufacturedDateStr());
        vo.setPipeLineId(this.getLineName());
        vo.setPipeSegmentId(this.getSegmentName());
        return vo;
    }
}
